<template>
  <div id="app">
    <el-button type="primary">主要按钮</el-button>
    <div class="block">
      <!--  -->
      <span class="demonstration">区分颜色</span>
      <el-rate v-model="value2" :colors="colors"> </el-rate>
    </div>
    <el-calendar v-model="value"> </el-calendar>
    <!-- 正在加载的禁用按钮 -->
    <el-button
      :disabled="true"
      :loading="true"
      :size="'medium'"
      :type="'primary'"
      >我是按钮</el-button
    >
    <div class="block">
      <span class="demonstration">默认</span>
      <el-date-picker
        v-model="value1"
        @blur="handleBlur"
        type="date"
        placeholder="选择日期"
        @change="handlePickerChange"
      >
      </el-date-picker>
    </div>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {
      value2: null,
      colors: ["#99A9BF", "#F7BA2A", "#FF9900"], // 等同于 { 2: '#99A9BF', 4: { value: '#F7BA2A', excluded: true }, 5: '#FF9900' }
      value: new Date(),
      value1: "",
    };
  },
  methods: {
    handlePickerChange(value1) {
      console.log("用户选择的时间", value1);
    },
    // 失去焦点时触发
    handleBlur(vm) {
      console.log(vm);
    },
  },
};
</script>
<!--  Vue书写样式都在这里-->
<style scoped>
/deep/ .el-calendar__header {
  border-bottom-color: red;
}
</style>
